<%namespace file="/base/javascriptDefs.html" name="javascriptDefs" \
import="checkForDuplicateTranscriptionScript"/>

${checkForDuplicateTranscriptionScript()}

<fieldset>
<legend>Primary Data</legend>
<ol>
 <li>
  <label for="transcription">Transcription *
  <a class="buttonLink helper" \
     onclick="addRemoveElement('transcriptionKeyboard', \
     'transriptionKeyboardButton', 'the keyboard', 'k-|k+');" \
     title="view keyboard" id="transriptionKeyboardButton">k+</a>
  </label><br />
  ${h.select(name='grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=1)}
  <input id="transcription" maxlength="255" name="transcription" tabindex="1"
         type="text" onblur="checkForDuplicateTranscription();" />
  <div id='duplicateWarningDiv' class='invisiDiv'></div>
  <div id='transcriptionKeyboard' class='invisiDiv'>${c.transcriptionKeyboardTable}</div>
 </li>
 <li>
  <label for="morphemeBreak">Morpheme Break
  <a class="buttonLink helper" \
     onclick="addRemoveElement('morphemeBreakKeyboard', \
     'morphemeBreakKeyboardButton', 'the keyboard', 'k-|k+');" \
     title="view keyboard" id="morphemeBreakKeyboardButton">k+</a>
  </label><br />
  <input id="morphemeBreak" maxlength="255" name="morphemeBreak" tabindex="2" type="text" />
  <div id='morphemeBreakKeyboard' class='invisiDiv'>${c.morphemeBreakKeyboardTable}</div>
 </li>
 <li>
  <label for="morphemeGloss">Morpheme Gloss</label><br />
  <input id="morphemeGloss" maxlength="255" name="morphemeGloss" tabindex="3" type="text" />
 </li>
 <li>
  <label for="glosses-0">Gloss *</label><br />
  ${h.select(name='glosses-0.grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=4)}
  <input class="gloss" id="glosses-0.gloss" maxlength="255" name="glosses-0.gloss" tabindex="4" type="text" />
  <input type="hidden" id="glosses-0.ID" name="glosses-0.ID" />
% if hasattr(c, 'viewExtraGlossesFields') and c.viewExtraGlossesFields:
  <a class="buttonLink" id="addRemoveGloss1Button" tabindex=4 onclick="addRemoveElement('extraGlosses','addRemoveGloss1Button', 'extra gloss fields')" title="hide extra gloss fields">-</a>
 </li>
 <div id="extraGlosses" style="display:block;visibility:visible;">
% else:
  <a class="buttonLink" id="addRemoveGloss1Button" tabindex=4 onclick="addRemoveElement('extraGlosses','addRemoveGloss1Button', 'extra gloss fields')" title="show extra gloss fields">+</a>
 </li>
 <div id="extraGlosses">
% endif
 <li id="gloss1ListItem">
  <label for="glosses-1">Gloss</label><br />
  ${h.select(name='glosses-1.grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=5)}
  <input class="gloss" id="glosses-1.gloss" maxlength="255" name="glosses-1.gloss" tabindex="5" type="text" />
  <input type="hidden" id="glosses-1.ID" name="glosses-1.ID" />
 </li>
 <li id="gloss2ListItem">
  <label for="glosses-2">Gloss</label><br />
  ${h.select(name='glosses-2.grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=5)}
  <input class="gloss" id="glosses-2.gloss" maxlength="255" name="glosses-2.gloss" tabindex="5" type="text" />
  <input type="hidden" id="glosses-2.ID" name="glosses-2.ID" />
 </li>
 <li id="gloss3ListItem">
  <label for="glosses-3">Gloss</label><br />
  ${h.select(name='glosses-3.grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=5)}
  <input class="gloss" id="glosses-3.gloss" maxlength="255" name="glosses-3.gloss" tabindex="5" type="text" />
  <input type="hidden" id="glosses-3.ID" name="glosses-3.ID" />
 </li>
 </div>
</ol> 
</fieldset>
<fieldset>
<legend>Secondary Data</legend>
<ol>
 <li>
  <label for="comments">General Comments</label><br />
  <textarea id="comments" name="comments" rows="2" cols="10" tabindex="5"></textarea>
 </li>
 <li>
  <label for="speakerComments">Speaker Comments</label><br />
  <textarea id="speakerComments" name="speakerComments" rows="2" cols="10" tabindex="6"></textarea>
 </li>
 <li>
  <label for="elicitationMethod">Elicitation Method</label>
  <% elicitationMethods = [('', '')] + app_globals.elicitationMethods %>
  ${h.select(name='elicitationMethod', selected_values="", options=elicitationMethods, tabindex=7)}
 </li>
 <li>
  <label for="keywords_list">Keywords</label>
  <ul id="keywords_list" class="checklist">
% for i in range(len(app_globals.keywords)): 
   <li>
    <label for='${"keywords-%s.keyword"%(app_globals.keywords[i][0])}'><input id='${"keywords-%s.keyword"%(app_globals.keywords[i][0])}' name='${"keywords-%s.keyword"%(app_globals.keywords[i][0])}' type="checkbox" value="${app_globals.keywords[i][0]}" tabindex="8"/> ${app_globals.keywords[i][1]}</label>
   </li>
% endfor
  </ul>
 </li>
 <li>
  <label for="syntacticCategory">Category</label>
  <% syncats = [('', '')] + app_globals.syncats %>
  ${h.select(name='syntacticCategory', selected_values="", options=syncats, tabindex=9)}
 </li>
</ol>
</fieldset>
<fieldset>
<legend>Who and When</legend>
<ol>
 <li>
  <label for="speaker">Speaker</label>
  <% speakers = [('', '')] + app_globals.speakers %>
  ${h.select(name='speaker', selected_values="", options=speakers, tabindex=10)}
 </li>
 <li>
  <label for="elicitor">Elicitor</label>
  <% users = [('', '')] + app_globals.users %>
  ${h.select(name='elicitor', selected_values="", options=users, tabindex=11)}
 </li>
 <li>
  <label for="verifier">Verifier</label>
  ${h.select(name='verifier', selected_values="", options=users, tabindex=12)}
 </li>
 <li>
  <label for="source">Source</label>
  <% sources = [('', '')] + app_globals.sources %>
  ${h.select(name='source', selected_values="", options=sources, tabindex=13)}
 </li>
 <li>
  <label for="dateElicited">Date Elicited (MM/DD/YYYY)</label>
  <input id="dateElicited" maxlength="10" name="dateElicited" tabindex="14" type="text" />
 </li>
</ol>
</fieldset>




